<template>
  <div class="pagination-container">
    <el-pagination
      :total="total"
      :current-page="currentPage"
      :page-sizes="[5,10, 20, 30, 60]"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>

export default {
  name: 'Pagination',
  props: {
    total: {
      type: Number,
      default: 1
    },
    currentPage: {
      type: Number,
      default: 1
    },
    pageSize: {
      type: Number,
      default: 20
    }
  },
  methods: {
    handleSizeChange(val) {
      this.$emit('handleSizeChange', { 'value': val })
    },
    handleCurrentChange(val) {
      this.$emit('handleCurrentChange', { 'value': val })
    }
  }
}
</script>

<style scoped>
.pagination-container {
  background: #fff;
  padding: 32px 16px;
}
</style>
